$OpenBSD: patch-man_CMakeLists_txt,v 1.1 2013/02/03 23:07:02 nigel Exp $
--- man/CMakeLists.txt.orig	Fri Feb  1 14:34:01 2013
+++ man/CMakeLists.txt	Sun Feb  3 14:59:28 2013
@@ -1,10 +1,14 @@
 # Add man page custom target
-find_program(GROFF_EXECUTABLE NAMES groff)
-find_program(PS2PDF13_EXECUTABLE NAMES ps2pdf13)
+if (WIN32)
+	find_program(GROFF_EXECUTABLE NAMES groff)
+	find_program(PS2PDF13_EXECUTABLE NAMES ps2pdf13)
+endif(WIN32)
 
 set (MAN_NAMES ettercap.8 etterfilter.8 etterlog.8 etter.conf.5)
 set(MAN_FILES)
-set(PDF_FILES)
+if (WIN32)
+	set(PDF_FILES)
+endif(WIN32)
 
 if (ENABLE_PLUGINS)
         set(MAN_NAMES ${MAN_NAMES} ettercap_plugins.8)
@@ -14,29 +18,33 @@ if (ENABLE_CURSES)
         set(MAN_NAMES ${MAN_NAMES} ettercap_curses.8)
 endif(ENABLE_CURSES)
 
-foreach (m IN LISTS MAN_NAMES)
-        set(mf ${CMAKE_BINARY_DIR}/man/${m})
-        set(ps ${CMAKE_BINARY_DIR}/man/${m}.ps)
-        set(pdf ${CMAKE_BINARY_DIR}/man/${m}.pdf)
+if (WIN32)
+	foreach (m IN LISTS MAN_NAMES)
+		set(mf ${CMAKE_BINARY_DIR}/man/${m})
+		set(ps ${CMAKE_BINARY_DIR}/man/${m}.ps)
+		set(pdf ${CMAKE_BINARY_DIR}/man/${m}.pdf)
 
-        add_custom_command(OUTPUT ${mf}.ps
-        COMMAND ${GROFF_EXECUTABLE} -mandoc -Tps ${mf} > ${ps}
-        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-        COMMENT "Building manpage ${mf}"
-        VERBATIM)
-        list(APPEND MAN_FILES ${mf})
+		add_custom_command(OUTPUT ${mf}.ps
+		COMMAND ${GROFF_EXECUTABLE} -mandoc -Tps ${mf} > ${ps}
+		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+		COMMENT "Building manpage ${mf}"
+		VERBATIM)
+		list(APPEND MAN_FILES ${mf})
 
-        add_custom_command(OUTPUT ${pdf}
-        COMMAND ${PS2PDF13_EXECUTABLE} ${ps} ${pdf}
-        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-	DEPENDS ${mf}.ps
-        COMMENT "Creating PDF for ${ps}"
-        VERBATIM)
-        list(APPEND PDF_FILES ${pdf})
-endforeach()
+		add_custom_command(OUTPUT ${pdf}
+		COMMAND ${PS2PDF13_EXECUTABLE} ${ps} ${pdf}
+		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+		DEPENDS ${mf}.ps
+		COMMENT "Creating PDF for ${ps}"
+		VERBATIM)
+		list(APPEND PDF_FILES ${pdf})
+	endforeach()
+endif(WIN32)
 
 add_custom_target(man ALL DEPENDS ${MAN_FILES})
-add_custom_target(pdf ALL DEPENDS ${PDF_FILES})
+if (WIN32)
+	add_custom_target(pdf ALL DEPENDS ${PDF_FILES})
+endif(WIN32)
 
 install(FILES ${CMAKE_BINARY_DIR}/man/ettercap.8 ${CMAKE_BINARY_DIR}/man/etterfilter.8 ${CMAKE_BINARY_DIR}/man/etterlog.8 DESTINATION ${MAN_INSTALLDIR}/man8/)
 configure_file("ettercap.8.in" "ettercap.8")
